<!DOCTYPE html>
<html>

	<head>
		<title>平涛</title>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">

		<meta name="description" content="Write an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description.
">

			<link rel="stylesheet" href="__PUBLIC__/lib/weui.min.css">
			<link rel="stylesheet" href="__PUBLIC__/css/jquery-weui.css">
			<link rel="stylesheet" href="__PUBLIC__/css/style.css">
			<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/style.css">
			<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/aui-iconfont.css">
			<!--新增-->
			<style>
			    #list{padding-top: 50px;padding-bottom: 50px;}
                .weui-infinite-scroll{padding-bottom: 50px;}
			</style>
	</head>

	<body ontouchstart>
		<!--去掉 <div class="weui_tab">-->
			<div class="weui_navbar weui_navbar1">
				<div class="weui_navbar_item weui_bar_item_on">
					<div style="text-align:left;float:left">
						<a href='javascript:history.go(-1)' onclick='back()'>
							<span class="aui-iconfont aui-icon-left"></span>
						</a>
					</div>
					<span>外勤记录</span>
					<div class="f-r">
						<a href='{:U("waiqin/waiqin")}' onclick='back()'>
							<span class="weui_tabbar_label aui-iconfont aui-icon-add"></span>
						</a>
					</div>
				</div>
			</div>
			<!--<div class="weui_tab_bd"> 修改为<div id="list"> -->
			<div id="list">
				<volist name="list" id="vo">
					<div class="weui_panel_bd">
						<a href="{:U('Waiqin/show',array('id'=> $vo['id']))}">
							<div class="weui_media_box weui_media_text p-t1">
								<div class="con-head1">
									<!--<php>echo getClient($vo[cid])</php> -->
									<div class="weui_media_title con-head2">拜访客户：{$vo.cid|getClient}</div>
									<?php
                  	if(!$vo['signout_time']){
                  		?>

									<div class="f-r rb1 rb3">未签退</div>
									<?php }else{ ?>
										<div class="f-r rb1 rb2">拜访完成</div>

									<?php } ?>
								</div>
								<p class="weui_media_desc wid2">{$vo.id|getContent}</p>
								<div class="con-bot1">
									<div class="f-l rb1">时间：{$vo.visit_time|timeToDate}</div>
									<div class="f-r rb">地点：{$vo.location_in|mb_substr=0,9}</div>
								</div>
							</div>
						</a>
					</div>

				</volist>

				<!--<div class="weui_panel_bd ">
            <a href="content.html">
              <div class="weui_media_box weui_media_text p-t1">
                <div class="con-head1">          
                  <div class="weui_media_title con-head2">拜访客户：客户一</div>
                </div>
                <p class="weui_media_desc wid2">由各种物质组成的巨型球状天体，叫做星球。星球有一定的形状，有自己的运行轨道。</p>
                <div class="con-bot1">
                  <div class="f-l rb1" >时间：2017-1-23</div>
                  <div class="f-r rb">地点：雨花台区某某地</div>
                </div>
              </div>
            </a>
          </div>-->
				<!--<div class="weui_panel_bd ">
            <a href="content.html">
              <div class="weui_media_box weui_media_text p-t1">
                <div class="con-head1">          
                  <div class="weui_media_title con-head2">拜访客户：客户一</div>
                </div>
                <p class="weui_media_desc wid2">由各种物质组成的巨型球状天体，叫做星球。星球有一定的形状，有自己的运行轨道。</p>
                <div class="con-bot1">
                  <div class="f-l rb1" >时间：2017-1-23</div>
                  <div class="f-r rb">地点：雨花台区某某地</div>
                </div>
              </div>
            </a>
          </div>-->
				<!--<div class="weui_panel_bd ">
            <a href="content.html">
              <div class="weui_media_box weui_media_text p-t1">
                <div class="con-head1">          
                  <div class="weui_media_title con-head2">拜访客户：客户一</div>
                </div>
                <p class="weui_media_desc wid2">由各种物质组成的巨型球状天体，叫做星球。星球有一定的形状，有自己的运行轨道。</p>
                <div class="con-bot1">
                  <div class="f-l rb1" >时间：2017-1-23</div>
                  <div class="f-r rb">地点：雨花台区某某地</div>
                </div>
              </div>
            </a>
          </div>-->
			</div>
			<!--新增-->
			<div class="weui-infinite-scroll">
              <div class="infinite-preloader"></div>
              正在加载
            </div>
			<div class="weui_tabbar weui_tabbar1">
				<a href="../index.html" class="weui_tabbar_item weui_bar_item_on">
					<div class="weui_tabbar_icon">
						<span class="weui_tabbar_label aui-iconfont aui-icon-home "></span>
					</div>
					<p class="weui_tabbar_label ">首页</p>
				</a>
				<a href="qiandao.html" class="weui_tabbar_item">
					<div class="weui_tabbar_icon">
						<span class="weui_tabbar_label aui-iconfont aui-icon-friend active"></span>
					</div>
					<p class="weui_tabbar_label active">外勤拜访</p>
				</a>
				<a href="../work/work-liebiao.html" class="weui_tabbar_item">
					<div class="weui_tabbar_icon">
						<span class="weui_tabbar_label aui-iconfont aui-icon-edit"></span>
					</div>
					<p class="weui_tabbar_label ">工作总结</p>
				</a>
			</div>
		<!--</div>-->

		<script src="__PUBLIC__/lib/jquery-2.1.4.js"></script>
		<script src="__PUBLIC__/lib/fastclick.js"></script>
		<script src="__PUBLIC__/js/jquery-weui.js"></script>
		<script>
			$(function() {
				FastClick.attach(document.body);
			});
		</script>
		<!--新增-->
		<script>
		var loading = false;
            $(document.body).infinite().on("infinite", function() {
                if(loading) return;
                loading = true;
                // alert("dkd");
	        	$.ajax({
                	url:"{:U('Index/test')}",
                	dataType:'json',
                	type:'post',
                
                	success:function(json){
                	    
                	    alert(json)
    //             		if(data.trim() == "ok"){
				// 		alert("加载成功!");
				// 		window.location.reload();
				// 		}else{
				// 			alert("请重新刷新！");
				// 		}

                	}
	        	})
                
        });
        // var loading = false;
        //     $(document.body).infinite().on("infinite", function() {
        //         if(loading) return;
        //         loading = true;
        //         setTimeout(function() {
        //           $("#list").append('<div class="weui_panel_bd"><a href="{:U('Waiqin/show',array('id'=> $vo['id']))}"><div class="weui_media_box weui_media_text p-t1"><div class="con-head1"><div class="weui_media_title con-head2">拜访客户：{$vo.cid|getClient}</div><?php if(!$vo['signout_time']){ ?><div class="f-r rb1 rb3">未签退</div><?php }else{ ?><div class="f-r rb1 rb2">拜访完成</div><?php } ?></div><p class="weui_media_desc wid2">{$vo.id|getContent}</p><div class="con-bot1"><div class="f-l rb1">时间：{$vo.visit_time|timeToDate}</div><div class="f-r rb">地点：{$vo.location_in|mb_substr=0,9}</div></div></div></a></div>');
        //         loading = false;
        //     }, 2000);
        // });
    </script>

	</body>

</html>